1. /* sxcbrcdx.cpp by K.Tsuru */
  2. // function ID = 511 BRADIX(constant)
  3. /***********************************************
  4. SDecimal class
  5. Representation for 1/DRADIX in BRADIX
  6. ************************************************/
  7. #ifndef SN_H
  8. #include "sn.h"
  9. #endif
  10. static SDecimal* invDrdx = NULL;
  11. static uint invDsize = 0;
  12. void DrdxFree(){
  13. if(invDsize == 0) return;
  14. delete invDrdx; invDrdx = NULL; invDsize = 0;
  15. }
  16. SDecimal BRecDRadix(){
  17. uint max_sz = SNManager::SNMaxSize(SNManager::BIN_DEC);
  18. if( invDsize >= max_sz ) return *invDrdx;
  19. SDecimal one;
  20. one.SetInt(1);
  21. delete[] invDrdx;
  22. invDrdx = new SDecimal;
  23. XsDiv(one, DRADIX, *invDrdx);
  24. invDsize = max_sz;
  25. return *invDrdx;
  26. }

sxcbrcdx.cpp : last modifiled at 2017/06/23 10:40:13(720 bytes)
created at 2015/12/22 16:09:56
The creation time of this html file is 2017/10/27 15:45:59 (Fri Oct 27 15:45:59 2017).